Skip to content

Revert "CIG: Fix CIG parameters for unidirectional CIS"#960

Open
uier wants to merge 2 commits into
mainfrom
revert-943-cis-fix-unidirectional
Open

Revert "CIG: Fix CIG parameters for unidirectional CIS"#960
uier wants to merge 2 commits into
mainfrom
revert-943-cis-fix-unidirectional

Conversation

@uier

@uier uier commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Reverts #943

which was trying to fix a HCI error PARAMETER_OUT_OF_MANDATORY_RANGE_ERROR [0x30] raised by a Bluetooth controller when receiving parameters from a CIS creation.

Based on the Spec about LE Set CIG Parameters command:

The PHY_C_To_P[i] parameter identifies which PHY to use for transmission from the
Central to the Peripheral. The Host shall set at least one bit in this parameter and the
Controller shall pick a PHY from the bits that are set.

The PHY_P_To_C[i] parameter identifies which PHY to use for transmission from the
Peripheral to the Central. The Host shall set at least one bit in this parameter and the
Controller shall pick a PHY from the bits that are set.

We should not assign 0 to PHY for any direction even if it's unidirectional CIS on the other direction.

The RTN_C_To_P[i] (Retransmission Number) parameter contains the number of times
that a CIS Data PDU should be retransmitted from the Central to Peripheral before
being acknowledged or flushed (irrespective of which CIS events the retransmission
opportunities occur in). If the CIS is unidirectional from Peripheral to Central, this
parameter shall be ignored. Otherwise, this parameter is a recommendation to the
Controller which the Controller may ignore.

The RTN_P_To_C[i] parameter contains the number of times that a CIS Data PDU
should be retransmitted from the Peripheral to Central before being acknowledged or
flushed (irrespective of which CIS events the retransmission opportunities occur in). If
the CIS is unidirectional from Central to Peripheral, this parameter shall be ignored.
Otherwise, this parameter is a recommendation to the Controller which the Controller
may ignore.

This is ignored when it's unidirectional CIS on the other direction, but that specific controller doesn't satisfy if this is set to zero, but it also needs to set PHY to zero, which doesn't sound right and should file ticket to check with the vendor, instead of putting the wrong fix here.

@uier uier requested a review from zxzxwu July 13, 2026 13:26
@barbibulle

Copy link
Copy Markdown
Collaborator

Even if it is ignored, maybe we can still set rtn_c_to_p and/or rtn_p_to_c to 0 (leaving phy unchanged), for maximum compatibility with controllers that are a bit too picky?

@uier uier force-pushed the revert-943-cis-fix-unidirectional branch from a3ba5e7 to 8b2bd06 Compare July 14, 2026 07:51
@uier uier requested a review from zxzxwu July 14, 2026 07:58
@uier

uier commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Even if it is ignored, maybe we can still set rtn_c_to_p and/or rtn_p_to_c to 0 (leaving phy unchanged), for maximum compatibility with controllers that are a bit too picky?

Sounds good, changed to this way

@uier

uier commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

I've found that the Intel BE200 is raising 0x30 if the unused direction is not setting RTN = 0 plus PHY = 1M, which is quite tricky...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants